#!/usr/bin/env node

const commander =require('commander')
const inquirer =require('inquirer')
const axios =require('axios')


commander.command('star [env]').action((option) => {
    // encodeURIComponent('汉字’)
    axios
        .get(`http://web.juhe.cn:8080/constellation/getAll?key=1e86cbe4ac7c8e1d23dcc5a133221f7b&type=today&consName=${encodeURIComponent(option)}`).then(res=>{
        console.log('今日运势：',res.data.summary)
    })
})
commander.parse(process.argv)